package commandDemo;

import commandDemo.impl.Stereo;

public class StereoOnWithCDCommand implements Command{

    private final Stereo stereo;

    public StereoOnWithCDCommand(Stereo stereo) {
        this.stereo = stereo;
    }


    @Override
    public void execute() {
        if (stereo!=null){
            stereo.on();
            stereo.setCd();
            stereo.setVolume(10);
        }
    }
}
